Managing infectious forwarded messages

ABSTRACT

Systems and methods for managing forwarded infectious messages are provided. Managing electronic message comprises receiving a message, forwarding the message, determining that the forwarded message is infectious after the message has been forwarded and preventing the infectious forwarded message from spreading.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation and claims the priority benefit ofU.S. patent application Ser. No. 14/578,065 filed Dec. 19, 2014, set toissue as U.S. Pat. No. 9,237,163 on Jan. 12, 2016, which is acontinuation and claims the priority benefit of U.S. patent applicationSer. No. 11/895,519 filed Aug. 24, 2007 and titled “Managing InfectiousForwarded Messages,” now U.S. Pat. No. 8,955,106 issued Feb. 10, 2015,which is a division of and claims priority to U.S. patent applicationSer. No. 11/156,373 filed Jun. 16, 2005 and titled “Managing InfectiousMessages,” now U.S. Pat. No. 7,343,624 issued Mar. 11, 2008, whichclaims the priority benefit of U.S. provisional patent application No.60/587,839 filed Jul. 13, 2004 and titled “Detecting Malicious Messageon Day Zero,” the disclosures of which are incorporated herein byreference.

BACKGROUND OF THE INVENTION

Computer viruses and worms are often transmitted via electronicmessages. An infectious message usually comes in the form of an e-mailwith a file attachment, although other forms of infection are possible.Attackers have exploited many protocols that exchange electronicinformation, including email, instant messaging, SQL protocols, HyperText Transfer Protocols (HTTP), Lightweight Directory Access Protocol(LDAP), File Transfer Protocol (FTP), telnet, etc. When the attachmentis opened, the virus executes. Sometimes the virus is launched through alink provided in the email. Virus or worm attacks can cause considerabledamage to organizations. Thus, many anti-virus solutions have beendeveloped to identify viruses and prevent further damage. Currently,most anti-virus products use virus signatures based on known viruses foridentification. Such systems, however, often do not protect the networkeffectively during the time window between a virus' first appearance andthe deployment of its signature. Networks are particularly vulnerableduring this time window, which is referred to as “time zero” or “dayzero”. For a typical anti-virus system to function effectively, itusually requires viruses to be identified, their signatures developedand deployed. Even after the system adapts after an outbreak, time zerothreat can sometimes re-immerge as the virus mutates, rendering the oldsignature obsolete.

One approach to time zero virus detection is to use a content filter toidentify and quarantine any message with a potentially executableattachment. This approach is cumbersome because it could incorrectlyflag attachments in Word, Excel and other frequently used documentformats even if the attachments are harmless, resulting in high rate ifmisidentification (also referred to as false positives). Furthermore,the approach may not be affective if the virus author disguises thenature of the attachment. For example, some virus messages ask therecipients to rename a .txt file as .exe and then click on it. Sometimesthe virus author exploits files that were not previously thought to beexecutable, such as JPEG files. Therefore, it would be useful to have abetter time zero detection technique. It would also be desirable if thetechnique could detect viruses more accurately and generate fewer falsepositives.

SUMMARY OF THE CLAIMED INVENTION

Embodiments for evaluating a file attached to an electronic message forthe presence of a virus are claimed.

In a first claimed embodiment, a method for evaluating a file attachedto an electronic message for the presence of a virus includes receivingan electronic message at a computing device. The electronic messageincludes an attachment that has a file name. The computing device has atleast a first virus detection routine and executable instructions storedin memory. Upon executing the instructions using the processor, thecomputing device applies at least a signature matching test that outputsa probability that the attachment includes a virus. The computing devicequarantines the electronic message when the outputted probability thatthe attachment includes a virus exceeds a predetermined threshold. Thecomputing device searches for another virus detection test stored inmemory when the outputted probability that the attachment includes avirus does not exceed the predetermined threshold and applies the othervirus detection test. The other virus detection test includes at leastone of a file name test, a bit pattern test, or an N-gram test. Theprobability that the attachment includes a virus is updated based on theother virus detection test and the computing device quarantines theelectronic message when the updated probability that the attachmentincludes a virus exceeds the predetermined threshold. The computingdevice identifies the electronic message as free of viruses when theupdated probability that the attachment includes a virus does not exceedthe predetermined threshold.

In a second claimed embodiment, a computer program is embodied on anon-transitory computer-readable storage medium. The program isexecutable by a processor to perform a method for evaluating a fileattached to an electronic message for the presence of a virus. Themethod includes receiving an electronic message at a computing device.The electronic message includes an attachment that has a file name. Thecomputing device has at least a first virus detection routine stored inmemory. The method includes applying at least a signature matching testthat outputs a probability that the attachment includes a virus. Themethod further includes quarantining the electronic message when theoutputted probability that the attachment includes a virus exceeds apredetermined threshold. The method includes searching for another virusdetection test stored in memory when the outputted probability that theattachment includes a virus does not exceed the predetermined thresholdand applying the other virus detection test. The other virus detectiontest includes at least one of a file name test, a bit pattern test, oran N-gram test. The probability that the attachment includes a virus isupdated based on the other virus detection test. The method furtherincludes quarantining the electronic message when the updatedprobability that the attachment includes a virus exceeds thepredetermined threshold. The method also includes identifying theelectronic message as free of viruses when the updated probability thatthe attachment includes a virus does not exceed the predeterminedthreshold.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious message.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.

FIG. 5 is a flowchart illustrating another embodiment of trafficanalysis.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess, an apparatus, a system, a composition of matter, a computerreadable medium such as a computer readable storage medium or a computernetwork wherein program instructions are sent over optical or electroniccommunication links. In this specification, these implementations, orany other form that the invention may take, may be referred to astechniques. A component such as a processor or memory described as beingconfigured to perform a task includes both a general component that istemporarily configured to perform the task at a given time or a specificcomponent that is manufactured to perform the task. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Detecting infectious messages is disclosed. Analysis of individualcharacteristics of messages is performed in some embodiments todetermine whether the message is suspicious. If a message is deemedsuspicious, it is determined whether a similar message has been notedpreviously as possibly suspicious. If a similar message has beenpreviously noted, the message is classified according to its individualcharacteristics and its similarity to the noted message. In someembodiments, if a message that was forwarded is later found to beinfectious, the infectious message is reported to human or machineagents for appropriate action to take place.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system. In this example, message forwarding device 102 may beimplemented as a mail server or gateway or other appropriate device. Themessage forwarding device is configured to forward messages received onits input interface. As used herein, forwarding includes sending amessage to email servers or gateways, networking devices, email clientsof individual recipients, or any other appropriate locations in themessage's path of flow. Some of the messages to be forwarded may beinfectious (i.e. containing viruses, worms or other items that may causeunwanted behavior on the recipient's device and/or the network). In thisexample, an infectious message detection mechanism 104 cooperates withthe message forwarding device to identify the virus and preventsinfectious messages from further spreading. In some embodiments, thevirus detection mechanism is implemented as software, firmware,specialized hardware or any other appropriate techniques on the messageforwarding device. In some embodiments, the detection mechanism isimplemented on a separate device.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious messages. Process 200 may be implemented on a messageforwarding device, a standalone device, or as a part of another networkmonitoring/security device for any other appropriate device systems. Inthis example, an individual message analysis is performed initially(202). As will be shown in more details below, the individual messageanalysis evaluates the intrinsic characteristics of the message,determines the probability of the message being infectious, andclassifies the message. In some embodiments, the message is classifiedas legitimate, suspicious or infectious based on the probability. Themessage is determined to be legitimate if the probability is below alegitimate threshold, infectious if the probability exceeds aninfectious threshold, and suspicious if the probability is somewherebetween the two thresholds. Other evaluations and classificationtechniques are used in different embodiments.

In the process shown, if a message is determined to be legitimate, themessage is forwarded to the appropriate recipient (204). If the messageis determined to be infectious, the message is treated as appropriate(206). In some embodiments, the message is quarantined or deleted fromthe delivery queue. If a message is deemed to be suspicious, a trafficanalysis is performed on the suspicious message (208). The trafficanalysis identifies any traffic spike in the e-mail message stream thatis consistent with the pattern of a virus outbreak. Details of thetraffic analysis are described below. In this example, analysis of amessage in the context of all message traffic yields another probabilityof the message being infectious, and classifies the suspicious messageas either legitimate or infectious according to the probability.Legitimate messages are processed normally and forwarded to theirdestinations (204). Infectious messages are treated appropriately (206).Other classifications are also possible. The order of the analyses maybe different in some implementations and some embodiments perform theanalysis in parallel. In some embodiments, each analysis is performedindependently.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments. In this example, process202 initiates when a message is received (302). The message is thensubmitted to a plurality of tests configured to examine thecharacteristics of the message and detect any anomalies. After eachtest, the probability of the message being infectious is updatedaccording to the test result (318). In some embodiments, the weight ofdifferent test results in calculating the probability may vary.

It is then determined whether the probability exceeds the threshold forthe message to be deemed infectious (320). If so, the message isconsidered infectious and may be quarantined, deleted from send queue,or otherwise appropriately handled. If, however, the probability doesnot exceed the threshold, it is determined whether more tests areavailable (322). If so, the next available test is applied and theprocess of updating probability and testing for threshold is repeated.If no more tests are available, the probability is compared to thethreshold required for a legitimate message (324). If the probabilityexceeds the legitimate threshold, the message is deemed to besuspicious. Otherwise, the tests indicate that the message islegitimate. The classification of the message is passed on to the nextroutine. According to process 200, depending on whether the message islegitimate, suspicious or infectious, the next routine may forward themessage, perform traffic analysis on the message, or treat the messageas infectious.

Examples of the tests used in the individual message analysis includesignature matching tests (304), file name tests (306), character tests(308), bit pattern tests (310), N-gram tests (312), bit pattern test(314), and probabilistic finite state automata (PFSA) tests (316). Thetests may be arranged in ay appropriate order. Some tests maybe omittedand different tests may be used.

Some of the tests analyze the intrinsic characteristics of the messageand/or its attachments. In the embodiments shown, the signature matchingtest (304) compares the signature of the message with the signatures ofknown viruses. The test in some embodiments generates a probability on asliding scale, where an exact match leads to a probability of 1, and aninexact match receives a probability value that depends on the degree ofsimilarity.

The file name test (306) examines the name of the attachment anddetermines if there is anomaly. For example, a file name such as “readme.txt.exe” is highly suspicious since it would appear that the senderis attempting to misrepresent the nature of the executable and pass thefile off as a text file.

FIG. 1 illustrates a system 100 for a transaction process between a user101 and a vendor 104. The system 100 includes user experience system102, vendor strategy system 103, and interaction system 107. Each ofsystems 102, 103, and 107 may communicate directly with each other, forexample wired channels 105 and 106, or indirectly over network 120.Network 120 may include one or more private networks, public networks,LANs, WANs, the Internet, an intranet, a Wi-Fi network, cellularnetwork, or a combination of these networks.

The bit pattern test (310) examines certain portions of the file anddetermines whether there is anomaly. Many files contain embedded bitpatterns that indicate the file type. The magic number or magic sequenceis such a bit pattern. For example, an executable file includes aparticular bit pattern that indicates to the operating system that thefile is an executable. The operating system will execute any file thatstarts with the magic sequence, regardless of the file extension. If anattachment has an extension such as .txt or .doc that seems to indicatethat the file is textual in nature, yet the starting sequence in thefile contains the magic sequence of an executable, then there is a highprobability that the sender is attempting to disguise an executable as atext document. Therefore, the attachment is highly suspicious.

Some of the tests such as N-gram (312) and PFSA (314) measure thedeviation of the received message from a baseline. In this example, thebaseline is built from a collection of known good messages. An N-grammodel describes the properties of the good messages. The N-gram model isa collection of token sequences and the corresponding probability ofeach sequence. The tokens can be characters, words or other appropriateentities. The test compares the N-gram model to an incoming message toestimate the probability that a message is legitimate. The probabilitiesof the N-gram sequences of the incoming messages can be combined withthe probabilities of the N-gram sequences of the baseline model usingany of several methods. In some embodiments, the N-gram test comparesthe test result with a certain threshold to determine the legitimacy ofa message. In some embodiments, a message deemed legitimate by theN-gram test is not subject to further testing, thus reducing falsepositive rate. In some embodiments, a message found to be legitimate bythe N-gram test is further tested to ascertain its true legitimacy.

In the example shown, the PFSA test (314) relies on a model that isbuilt from a set of known good messages. The model describes theproperties of legitimate messages. The model includes a plurality oftoken such as characters and words, and the probabilities associatedwith the tokens. The test estimates the probability that a particularmessage that includes a sequence of tokens can be generated by themodel. In some embodiments, similar to the N-gram test, the test resultis compared with a certain threshold to determine the legitimacy of amessage. In some embodiments, a message deemed legitimate by the PFSAtest is not subject to further testing to avoid false positives. In someembodiments, a message found to be legitimate by the PFSA test isfurther tested to ascertain its true legitimacy.

In some embodiments, information about previously received messages iscollected and used to identify an increase in the number of similar andpotentially suspicious messages. Messages are clustered to establish astatistical model that can be used to detect similar messages. The datacollected may include one or more of the following: time of receipt, therecipients, number of recipients, the sender, size of the attachment,number of attachments, number of executable attachments, file name, fileextension, file type according to the starting sequence of the filebinary, etc. The characteristics of an incoming message are compared tothe model to determine whether similar messages have been notedpreviously. A traffic spike in similar messages that were previouslynoted as potentially suspicious indicates the likelihood of a virusoutbreak.

In some embodiments, traffic patterns are analyzed on a global networklevel. In other words, the analysis may monitor all the messages routedthrough an internet service provider and note the suspicious ones. Insome embodiments, the traffic patterns are analyzed locally. Forexample, messages on a local network or on different subnets of a localnetwork may be analyzed separately. In some embodiments, a combinationof global and local analyses is used.

In local traffic analysis, different subnets can have different trafficpatterns. For example, within a corporation, the traffic on theengineering department subnet may involve a large number of executablesand binary files. Thus, absent other indicators, executables and binaryattachments will not always trigger an alarm. In contrast, the trafficpattern of the accounting department may mostly involve text documentsand spreadsheets, therefore an increase in binary or executableattachments would indicate a potential outbreak. Tailoring trafficanalysis based on local traffic can identify targeted attacks as well asvariants of old viruses.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.Process 208 may be performed after the individual message analysis asshown in process 200, before the individual message analysis, incombination with other analysis, or independently. Process 208 initiateswhen a message is received (402). The characteristics of the message arecompared to the characteristics of previously stored suspicious message(404). In some embodiments, the system collects suspicious messagesresulting from other tests such as the ones in the individual messageanalysis shown in FIG. 3.

It is then determined whether the message is similar to the previousstored messages (406). If the message is not similar to any of thepreviously stored suspicious messages, a low probability ofinfectiousness is assigned. If, however, the message is similar toprevious stored suspicious messages, information associated with thereceived message is also stored and statistical model is updatedaccordingly (408). It is then determined whether the number of suchsimilar and suspicious messages has exceeded a predefined threshold(410). If not, the message is not classified as infectious at thispoint, although a higher probability may be assigned to it. If the totalnumber of such suspicious messages has exceeded the threshold, it islikely that the message is indeed infectious and should be appropriatelytreated. For example, consider the case where the threshold number isset to 5, and there are already 4 instances of suspicious messages withexecutable attachments having the same extension and similar size. Whena fifth message arrives with similar sized executable attachments withthe same extension, the message will be classified as infectious. Byselecting an appropriate threshold value, infectious messages can bedetected and prevented without a major outbreak.

Sometimes the system may initially find a message to be legitimate ormerely suspicious and forward the message to its destination. Later asmore information becomes available, the system may find the message tobe infectious. FIG. 5 is a flowchart illustrating another embodiment oftraffic analysis. Process 500 may be performed independently or inconjunction with other types of message analyses. In the example shown,a message is received (502). The message is initially determined to belegitimate and forwarded (504). Sometime after he message has beenforwarded, the forwarded message is determined to be infectious (506). Amessage may be found as infectious according to any appropriate messageanalysis techniques, including those described in this specification. Insome embodiments, information pertaining to the forwarded message isoptionally stored in memory, on disk or in other forms of storage mediumso that it can be used for the analysis. Again, consider the examplewhere the threshold number in the traffic analysis is set to 5 and 4similar messages have been received. Although these 4 messages are notedas suspicious, because the threshold is not met the messages are stillforwarded. The characteristics of the suspicious messages are stored.When a similar fifth message is received, its characteristics arecompared to the characteristics of the four previously noted messages.N-gram, PFSA or other appropriate techniques can be used in thecomparison. The analysis shows that the number of similar and suspiciousmessages meets the threshold. Therefore, the fifth message isinfectious, as are the four previously noted and forwarded messages.

Once an already forwarded message is deemed infectious, measures aretaken to prevent the infectious forwarded message from spreading (508).In the example shown above, the system will take actions to keep the 4instances of previously forwarded message from being opened or resent bytheir recipients. Additionally, the system will not forward the fifthmessage. In some embodiments, the system reports the finding to thesystem administrator, the recipient, and/or other users on the networkto prevent the previously forwarded infectious message from furtherspreading. Warning messages, log messages or other appropriatetechniques may be used. In some embodiments, the system generates acancellation request to a forwarding agent such as the mail server,which will attempt to prevent the message from being forwarded bydeleting them from the send queue, moving the messages into a locationto be quarantined or any other appropriate action.

Detecting and managing infectious messages have been disclosed. Byperforming individual message analysis and/or traffic analysis,infectious messages can be more accurately identified at time zero, andinfectious messages that initially escaped detection can be lateridentified and prevented from further spreading.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A method for evaluating a file attached to anelectronic message for the presence of a virus, the method comprising:receiving an electronic message at a computing device, the electronicmessage including an attachment having a file name, the computing deviceincluding at least a first virus detection routine stored in memory; andexecuting instructions stored in memory of the computing device, whereinexecution of the instructions by a processor of the computing device:applies at least a signature matching test that outputs a probabilitythat the attachment includes a virus, quarantines the electronic messagewhen the outputted probability that the attachment includes a virusexceeds a predetermined threshold, searches for another virus detectiontest stored in memory when the outputted probability that the attachmentincludes a virus does not exceed the predetermined threshold, appliesthe other virus detection test, wherein the other virus detection testincludes at least one of a file name test, a bit pattern test, or anN-gram test, and wherein the probability that the attachment includes avirus is updated based on the other virus detection test, quarantinesthe electronic message when the updated probability that the attachmentincludes a virus exceeds the predetermined threshold, and identifies theelectronic message as free of viruses when the updated probability thatthe attachment includes a virus does not exceed the predeterminedthreshold.
 2. The method of claim 1, wherein the file name of theattachment indicates that the attachment is a text file.
 3. The methodof claim 1, wherein the file name of the attachment indicates that theattachment is an executable file.
 4. The method of claim 1, wherein thefile name of the attachment indicates that the attachment is an imagefile.
 5. The method of claim 1, wherein the other virus detection testfurther includes a character test.
 6. The method of claim 1, wherein theother virus detection test further includes a probabilistic finite stateautomata test.
 7. The method of claim 1, wherein the other virusdetection test includes the use of a probability model.
 8. The method ofclaim 1, wherein the other virus detection test relies on a plurality ofelectronic messages previously identified as free of viruses.
 9. Themethod of claim 1, further comprising reporting the electronic messageas free of viruses to a system administrator.
 10. The method of claim 1,further comprising reporting the quarantined electronic message to asystem administrator.
 11. A non-transitory computer-readable storagemedium having a program embodied thereon, the program executable by aprocessor to perform a method for evaluating a file attached to anelectronic message for the presence of a virus, the method comprising:receiving an electronic message at a computing device, the electronicmessage including an attachment having a file name, the computing deviceincluding at least a first virus detection routine stored in memory;applying at least a signature matching test that outputs a probabilitythat the attachment includes a virus; quarantining the electronicmessage when the outputted probability that the attachment includes avirus exceeds a predetermined threshold; searching for another virusdetection test stored in memory when the outputted probability that theattachment includes a virus does not exceed the predetermined threshold;applying the other virus detection test, wherein the other virusdetection test includes at least one of a file name test, a bit patterntest, or an N-gram test, and wherein the probability that the attachmentincludes a virus is updated based on the other virus detection test;quarantining the electronic message when the updated probability thatthe attachment includes a virus exceeds the predetermined threshold; andidentifying the electronic message as free of viruses when the updatedprobability that the attachment includes a virus does not exceed thepredetermined threshold.
 12. The non-transitory computer-readablestorage medium of claim 11, wherein the file name of the attachmentindicates that the attachment is a text file.
 13. The non-transitorycomputer-readable storage medium of claim 11, wherein the file name ofthe attachment indicates that the attachment is an executable file. 14.The non-transitory computer-readable storage medium of claim 11, whereinthe file name of the attachment indicates that the attachment is animage file.
 15. The non-transitory computer-readable storage medium ofclaim 11, wherein the other virus detection test further includes acharacter test.
 16. The non-transitory computer-readable storage mediumof claim 11, wherein the other virus detection test further includes aprobabilistic finite state automata test.
 17. The non-transitorycomputer-readable storage medium of claim 11, wherein the other virusdetection test includes the use of a probability model.
 18. Thenon-transitory computer-readable storage medium of claim 11, wherein theother virus detection test relies on a plurality of electronic messagespreviously identified as free of viruses.
 19. The non-transitorycomputer-readable storage medium of claim 11, wherein the method furtherincludes reporting the electronic message as free of viruses to a systemadministrator.
 20. The non-transitory computer-readable storage mediumof claim 11, wherein the method further includes reporting thequarantined electronic message to a system administrator.